
package com.bei_en.teacher.admin.model.message.vo;

import java.util.*;
import com.bei_en.teacher.admin.model.message.bean.Message;
import com.bei_en.teacher.admin.model.BaseVo;
import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import java.math.BigDecimal;

/**
 * 用于前端页面数据传递
 * 
 * @author Guocg
 * @date 2016-9-10 0:10:23
 */
public class MessageVo extends BaseVo {

    private Message message;

    public MessageVo() {

    this.message = new Message();
    }

    public MessageVo(Message message) {

    this.message = message;
    }
    
    public Message getMessage() {

    return this.message;
    }
    
    public void setMessage(Message message) {

    this.message=message;
    }

        public Integer getId() {
            return this.message.getId();
        }
        public void setId(Integer id) {
            this.message.setId(id);
        }
        
        public void setId(Integer value) {
    	this.message.setId(value);
        }
	
    public Integer getId() {
        return this.message.getId();
    }
        
        public void setContent(String value) {
    	this.message.setContent(value);
        }
	@Length(max=10000)
    public String getContent() {
        return this.message.getContent();
    }
        
        public void setTitle(String value) {
    	this.message.setTitle(value);
        }
	@Length(max=255)
    public String getTitle() {
        return this.message.getTitle();
    }
        
    public void setCreateTime(Date value) {
        this.message.setCreateTime(value!=null ? (int) (value.getTime()/1000) : 0);
    }

	 public Date getCreateTime() {
	     Integer time=this.message.getCreateTime();
	     if (time!=null&&time!=0)
		    return new Date(Long.valueOf(time)*1000);
		else
		    return null;
	    }
    


}